home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
util
/
wb
/
background.lha
/
BackgroundV2.1
/
Docs
/
Backprefs.doc.English
< prev
next >
Wrap
Text File
|
1997-04-09
|
19KB
|
531 lines
1m Backprefs0m
1mBackground preferences editor0m
Backprefs v2.1
Backprefs and this text are Copyright ©1996 Roland Haas
Contents:
3mDisclaimer0m
3mKnown bugs0m
3mHistory0m
3mFuture0m
3mAuthor0m
3mWhich pictures0m
3mThe gadgets0m
3mThe menus0m
1mCopyright, copying ...0m
Copying
Backprefs may be distributed freely, as long as the contents of the archive
remains unchanged. No charge may be raised other then a small fee for
copying.
Backprefs may be sold with other free redistributable software, as long as the
conditions above are satisfied. This program may only be included in a
commercial package if you have the written permission of the `author.
disclaimer
This product is sold "AS IS" without representation or warranty of any kind,
either expressed or implied.
YOU USE THIS PROGRAM ON YOUR OWN RISK
INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
NO WARRANTIES ARE MADE. ALL USE IS AT YOUR OWN RISK. NO LIABILITY
OR RESPONSIBILITY IS ASSUMED.
Installer and Installer project icon
(c) Copyright 1995-96 Escom AG. All Rights Reserved.
Reproduced and distributed under license from escom AG.
1m Fehler0m
Currently no bugs are known to me.
1mVersions until today0m
NOTE: The version numbering starts at version 2.0. This program always gets
the same version number as th main program background. Using programs
with different version numbers will probably crash the machine.
03.08.1996: V2.0 initial version
08.04.1997: V2.1 color adaption
1mPlanned features0m
· Supporting parameters
· slider in preview window
Suggestions, bug reports to the 3mAuthor0m
1mThis is me0m
Backprefs was coded during long nights by:
Roland Haas
Mühlweg 16
77948 Friesenheim
phone: ++49 07821/68084
the GUI was created with GadToolsBox v2.0.
Suggestion, gifts and post cards are always welcome!
A new and better version of this text would be especially welcome. Perhaps
even a translation???
1mWhich pictures can be used?0m
Only pictures in the IFF-ILBM format can be loaded. The pictures _must_ use
the same palette as the workbench. The pictures should have the same aspect
ratio. E.g. if your workbench is HIRES/INTERLACED the picture should use the
same viewmode or LORES/NONLACE. Always keep in mind that the pictures
remain in memory; a 640x320 sized picture using eight colors will occupy
640*320*3/8 = 76800 byte CHIP-RAM. Also pictures must be loaded at program
startup; if you are using many big pictures, this can take several seconds.
So better use few little pictures setting the 3mTILE flag0m than many bigger
ones. Starting with V2.1 you can 3mload0m pictures later, but this takes of
course some time.
1mBackground preferences0m
3mLoaded Pictures:0m
+---------------------------------+ +-+ +-----------------+-+
3m Name 0m | Work:Pictures/Disc | |3m?0m| | Back1 |#|
+---------------------------------+ +-+ | Romantique |#|
+---------------------------------+ | Disc |#|
3mPattern 0m | "(#? full, #? free | | Desert |#|
+---------------------------------+ | |^|
+---------------------------------+ | |V|
3m Task 0m | WORKBENCH | +-----------------+-+
+---------------------------------+ | Disc |
+------------+ +----+----+----+----+
|3m View 0m| |3mAdd 0m|3mDel 0m|3m Up 0m|3mDown0m|
+------------+ +----+----+----+----+
+------------ 3mInformation0m ------------+ +-+
| Picture Workbench | 3mTile picture:0m |V|
| | +-+
| Size: 96 x 96 640 x 256 | +-+
| | 3mScreen picture:0m | |
| Planes: 3 3 | +-+
| | +-+
| Aspect: 10 : 22 22 : 44 | 3mDelay loading:0m | |
+-------------------------------------+ +-+
+------------+ +------------+ +------------+
|3m Save 0m| |3m Use 0m| |3m Cancel 0m|
+------------+ +------------+ +------------+
1mThe 'Name' gadget0m
You enter the path to the picture here. The button 3mbeside0m opens a
filerequester for doing the same job. The last part of the path appears in
the 3mlist of pictures0m.
1mThe 'Pattern' gadget0m
Here you can enter the pattern, which is to use for this window. Windows,
whose titles match the pattern will use this picture as their background
pattern.
Examples:
"#? full, #? free, #? in use" - matches all discs
(3D|DPAINT|XiPaint) - matches the drawers 3D, DPaint and
XiPaint
Possible tokens:
? Matches a single character.
# Matches the following expression 0 or more times.
(ab|cd) Matches any one of the items separated by '|'.
~ Negates the following expression. It matches all strings
that do not match the expression (aka ~(foo) matches all
strings that are not exactly "foo").
[abc] Character class: matches any of the characters in the class.
[~bc] Character class: matches any of the characters not in the
class.
a-z Character range (only within character classes).
% Matches 0 characters always (useful in "(foo|bar|%)").
1mThe 'Task' gadget0m
Here you can enter the task pattern, which is to use for this window. Tasks,
whose names match the pattern will use this picture as a background pattern
for their windows.
Examples:
WORKBENCH - only matches the Workbench task
#?DeliTracker#? - the famous DeliTracker
Note the two '#?'s surounding the pattern. They are quite usefull, since
'DeliTracker' may become 'dh0:Tools/DeliTracker' when started from CLI.
Possible tokens:
? Matches a single character.
# Matches the following expression 0 or more times.
(ab|cd) Matches any one of the items separated by '|'.
~ Negates the following expression. It matches all strings
that do not match the expression (aka ~(foo) matches all
strings that are not exactly "foo").
[abc] Character class: matches any of the characters in the class.
[~bc] Character class: matches any of the characters not in the
class.
a-z Character range (only within character classes).
% Matches 0 characters always (useful in "(foo|bar|%)").
1mThe TILE flag0m
The gadget 'Tile Picture' sets or clears the Tile flag of the 3mactive0m
picture. By setting this flag the picture will be tiled to cover the whole
area. Otherwise the remaining areas would be cleared with color 0 (grey).
For this flag to work well, the 3medges of the picture must fit together0m.
1mThe Screen flag0m
The gadget 'Screen Picture' sets or clears the screen flag of the 3mactive0m
picture. If this flag is set, the picture can be used to fill the blank
area on screens. The 3mpattern0m is used to tell which screen should use the
picture. To match the Workbench screen you must use the following:
Pattern: "Workbench Screen"
Task: "WORKBENCH"
ScreenPic: set
1mDelay loading0m
The gadget 'Delay loading' determines when the picture is loaded. If it is
set, then the picture is loaded when it is used for the first time. If
there is some memory needed later, this picture may be freed again to get
unused memory free. If you plan to use many pictures, you should set this
flags for those, that are rarely used. Background will need lots of time to
load them at startup otherwise.
1mThe floppy symbol0m
This gadget will open a filerequester allowing you to select a picture. The
path appears then in the 3mstring gadget0m beside and in the 3mlist of pictures0m.
1mThe list of pictures0m
In the right part of the window all currently loaded pictures are shown in
a listview. The active picture is shown below the list. 3mPath0m, 3mwindow pattern0m,
3mtask pattern0m and other 3mproperties0m can be change using the remaining gadgets.
1mThe 'Add' gadget0m
The Add gadget will create a new 3mentry0m for a picture. 3mPath0m and 3mpattern0m are
taken from the corresponding stringgadgets. The 3mtype0m of the new picture is
set to 'Normal', the 3mTILE flag0m is also set. The new picture is either added
just after the 3mactive picture0m or at the end of the l3mList of pictures0m.
1mThe 'Delete' gadget0m
The Delete gadget removes the 3mactive picture0m from the 3mlist of pictures0m;
however string gadgets remain untouched. So if you have by mistake deleted
the wrong picture, regain it using the 3mAdd0m gadget beside.
1mThe 'Up' gadget0m
The Up gadget moves the 3mactive picture0m one position up.
If two pictures match the same window the one later in the 3mlist0m will be
used. So the picture with the '#?' pattern should be on top of the 3mlist0m.
1mThe 'Down' gadget0m
The Down gadget moves the 3mactive picture0m one position down.
If two pictures match the same window the one later in the 3mlist0m will be
used. So there should only pictures at the end of the list that do only
match one window and especially no one with a '#?' 3mpattern0m.
1mThe 'View' gadget0m
Selecting View will open a window in which you can see the 3mactive picture 0m
like you would see it in an workbench window. To make changes (e.g. the
3mTILE flag0m) take effect you will have to select the gadget again.
1mThe 'Save' gadget0m
Save quits the editor, loads the pictures and saves the list so it is be
used after a reboot.
1mThe 'Use' gadget0m
Use quits the editor, loads the new pictures and saves the list until the
next reboot.
1mThe 'Cancel' gadget0m
Cancel quits the editor without saving the list.
1mGiven informations0m
In this field information about size, aspect ratio and depth of the picture
and your workbench are given. Size shows you (surprise, surprise) the Size
of the picture or the workbench in pixels. Pictures that are bigger than
your workbench will never be shown entirely. The number of colors is
computed as follows:
2^number of bitplanes
So if you are using 3 bitplanes you can choose from eight colors. A picture
using more colors than the workbench will probably look weird. Because of
this you should always choose pictures having as many as or less colors
than your workbench. The last value Aspect shows the ratio of height to
width. Workbench and picture should have the same ratio; otherwise
distortion will occur.
3mWhich pictures can be used?0m
1mThe menus0m
The menus are the same as the ones of the system preferences editors, so
you can also look their functions up in your system manual, if you don't
understand something.
Project Edit Picture Settings
3mOpen ...0m 3mReset To Defaults0m 3mCompute Colors0m 3mSave Icons?0m
3mSave As ...0m 3mLast Saved0m 3mDither0m 3mQuantization >>0m
3mAbout ...0m 3mRestore0m 3mLock Colors ...0m 3mMedian Cut0m
3mQuit0m 3mChange Colors ...0m 3mCustom0m
3mLoad Colors ...0m
3mSave Selected ...0m
1mProject/Open0m
Loads a list of pictures from a file.
1mProject/Save As0m
Lets you save the current list of pictures into a file. A file requester
opens up showing Sys:Prefs/Presets as the default destination. If 3mSave 0m
3mIcons?0m is selected then an icon will be created to. Other than the system
editors you can't load the list by double clicking on the icon. Instead you
will have to use 3mProject/Open0m to load the list.
1mProject/About0m
This menu item shows information about the program. (3mVersion, address of0m
3mauthors, utilities...0m)
1mProject/Quit0m
Quits the editor without saving the list of pictures. This option has the same
effect as 3mCancel0m.
1mEdit/Reset To Defaults0m
Clears the list of pictures. That means the patterns defined in WBPATTERN
will be used.
1mEdit/LastSaved0m
Loads the last settings that were saved using 3mSave0m.
1m Restore0m
Resets the settings to the ones preset at program startup.
1mPicture/Compute Colors0m
Trys to find colors that match for all pictures in the 3mlist0m. There are two
different methods for doing this. 3mMedian Cut0m is a procedure apadted from
Paul S. Heckbert. 3mCustom0m is something created by me. In contrast to 3mMedian0m
3mCut0m colors can be 3mlocked0m, so that they won't be changed.
But I really don't know if it is very fast or good. If somebody knows
something about such things, he may look at the 3malgorithm0m and send his
opinion to 3mme.0m
1m Algo0m
1. Step: All colors that are used in the pictures are counted
2. Step: the colors are sorted into the available color pots. If there
is no free one, the two, which are the most similar to each
other, are combined taking the new color into account.
3. Step: Finally the color for every pot is calculated by summing up all
color values calculating the average of them.
the first and the last step are ok, so here's the source for the second
step:
/* ColourCount contains the number of used colours */
for( i = ColourCount ; i > 0 ; i--)
{
/* Search for some free pot */
NewPot = NULL;
for(j = NumColours ; j > 0 ; j--)
{
/* The pot is still empty
* (locked colors have a 1)
*/
if (Pot[j] . NumPixels == 0)
{
NewPot = &Pot[j];
break;
}
}
if(NewPot != NULL) /* we have found a free one */
{
/* sRed, sGreen, sBlue contained the summed up color values
Red, Green, Blue the real ones
*/
NewPot -> NumPixels = ColourTable[i-1] . NumPixels;
NewPot -> Red = NewPot -> sRed = ColourTable[i-1] . Red;
NewPot -> Green = NewPot -> sGreen = ColourTable[i-1] . Green;
NewPot -> Blue = NewPot -> sBlue = ColourTable[i-1] . Blue;
}
else
{
/* Now we have to combine two pots */
Pot[0] . NumPixels = ColourTable[i] . NumPixels;
Pot[0] . Red = Pot[0] . sRed = ColourTable[i-1] . Red;
Pot[0] . Green = Pot[0] . sGreen = ColourTable[i-1] . Green;
Pot[0] . Blue = Pot[0] . sBlue = ColourTable[i-1] . Blue;
Dist = 0x7fffffff; /* Largest distance between two colors */
for(j = NumColours ; j > 0 && Dist; j--)
{
for(k = j - 1 ; k >= 0 && Dist ; k--)
{
DistRGB = Pot[k] . Red - Pot[j] . Red;
NewDist = DistRGB * DistRGB;
DistRGB = Pot[k] . Green - Pot[j] . Green;
NewDist += DistRGB * DistRGB;
DistRGB = Pot[k] . Blue - Pot[j] . Blue;
NewDist += DistRGB * DistRGB;
/* If the new color is nearer than the old one, and at
least one is not locked
*/
if ((NewDist <= Dist) && !(Pot[k] . Locked && Pot[j] . Locked))
{
NewPot = &Pot[j];
NewPot2 = &Pot[k];
Dist = NewDist;
}
}
}
/* Combine the two */
if (!((NewPot -> Locked) || (NewPot2 -> Locked)))
{
pix = (NewPot -> NumPixels += NewPot2 -> NumPixels);
NewPot -> Red = ((NewPot -> sRed += NewPot2 -> sRed)/pix);
NewPot -> Green = ((NewPot -> sGreen += NewPot2 -> sGreen)/pix);
NewPot -> Blue = ((NewPot -> sBlue += NewPot2 -> sBlue)/pix);
}
else if (NewPot2 -> Locked)
{
NewPot -> Red = NewPot2 -> Red;
NewPot -> Green = NewPot2 -> Green;
NewPot -> Blue = NewPot2 -> Blue;
}
/* Really insert the new color */
*NewPot2 = Pot[0];
} /* else */
} /* for i */
1mPicture/Dither0m
Color adapts the 3mactive picture0m to the current colors. The Floyd-Steinberg
algorithm is used for this.
1mPicture/Lock Colors0m
A window appears in which colors can be locked. Locked colors are not
changed during 3mCompute Colors0m. Only the 3mcustom0m method supports this, 3mMedian0m
3mCut0m does not care about locked colors.
1mPicture/Change Colors0m
A color requester appears in which the current colors can be changed.
1mPicture/Load Colors0m
Using this menu item you can load colors from any IFF file. So if you want
to 3madapt0m your pictures to Workbench's colors, load the file
'ENV:Sys/Palette.ilbm' and call 3mDither0m for every picture that will be shown
on Workbench. To use colors from another screen, you will have to make a
screenshot of it and then load this file.
1mPicture/Save Selected0m
This menu item allows you to save the 3mactive picture0m to disk. A
filerequester appears in which you can choose where it should be written to.
1mSettings/SaveIcons?0m
Using this option you can save icons along with settings saved by 3mSave As0m.
However these settings cannot be activated by double clicking on the icon.
Instead you must use 3mProject/Open0m.
1m Median0m
If this menu item is selected the Median Cut method is used for 3mcolor0m
3madaption0m. This method does not support 3mlocked colors.0m
1m Custom0m
If this menu item is selected my custom method is used for 3mcolor adaption.0m
It does support 3mlocked colors0m, but I don't know if it's fast or good.
Backprefs.guide.English converted by
Guide2Doc 1.0 (02-Nov-1993) FreeWare - © Koessi